import request from '../utils/request'

const getAllPower = (name) => {
    return request({
        url: `/users/${name}`
    })
}
const getOnePower = (name) => {
    return request({
        url: `/one/${name}`
    })
}
const getAvg = (name) => {
    return request({
        url: `/avg/${name}`
    })
}
const getAvgMonthData = (name) => {
    return request({
        url: `/avgMonthData/${name}`
    })
}
const getAvgMonth = (name) => {
    return request({
        url: `/avgMonth/${name}`
    })
}
const getAllPowerData = () => {
    return request({
        url: `/users`
    })
}
const getDataById = (id) => {
    return request({
        url: `/data/${id}`
    })
}
export {getAllPower,getOnePower,getAvg,getAvgMonthData,getAvgMonth,getAllPowerData,getDataById}
